//k1编辑

at_fnc_checkTerminalHack = {
	_return = false;
	_target = cursorTarget;
	if (isNull _target) exitwith {false};
	if (player distance _target > 3) exitwith {false};
	if (_target getvariable ["A3E_isTerminal",false] && {!(_target getvariable ["A3E_Terminal_Hacked",false])} && {!(player in Escape_Players_enemy)}) then {Escape_generatorTrailer = _target; _return = true};
	_return
};
at_fnc_checkTerminalHack2 = {
	_return = false;
	_target = cursorTarget;
	if (isNull _target) exitwith {false};
	if (player distance _target > 9) exitwith {false};
	if (_target getvariable ["A3E_isTerminal",false] && {!(_target getvariable ["A3E_Terminal_Hacked",false])} && {getPos _target select 2 > 1} && {!(player in Escape_Players_enemy)}) then {kk_Terminal_tag = _target; _return = true};
	_return
};

at_fnc_checkHealAtBuilding = {
	_return = false;
	_target = cursorTarget;
	if (isNull _target) exitwith {false};
	if (player distance _target > 3) exitwith {false};
	if (typeof _target == "Land_Medevac_House_V1_F") then {_return = true};
	_return
};

if !(player in Escape_Players_enemy) then {
	player addAction ["<t color=""#cccc00"">" + "入侵终端/上传数据" + "</t>", {if (isNil "Escape_intel_upload" && {Escape_intel_box distance Escape_generatorTrailer > 3}) exitwith {cutText ["你需要拿到情报到通信终端上传.", "Plain Down"]}; _this call A3E_fnc_Hijack}, [], 9, false, true, "", "call at_fnc_checkTerminalHack"];
	
	player addAction ["<t color='#00FFFF'>重置高度</t>", {_pos = getPosASL kk_Terminal_tag; _pos set [2, getPosASL player select 2]; kk_Terminal_tag setPosASL _pos}, [], 9, false, true, "", "call at_fnc_checkTerminalHack2"];
}; //

player addAction ["<t color=""#cc0000"">" + "治疗" + "</t>", "_this call A3E_fnc_HealAtBuilding;", [], 9, false, true, "", "call at_fnc_checkHealAtBuilding"];


